<?php

    class Zend_View_Helper_Navi extends Zend_View_Helper_Partial
    {

        public function getUser()
        {
            $x = new Zend_Auth_Storage_Session('User_Auth');
            $user_id = $x->read()->rkn_uid;
            return $user_id;
        }

        public function getShopMenu()
        {
            $model = new Application_Model_Common();
            $alldata = $model->getAdapter()->select()->from(array("c" => RKN_CATEGORY),array('cat_id','cat_name','status'))
                    ->join(array("s" => "rkn_sub_category"), "s.cat_id = c.cat_id ",array('scat_id','cat_id','cat_name as scat_name','status'))
                    ->where("c.status = '1' and s.status = '1' ")
                    ->order("c.cat_name asc");

            
            $alldata = $alldata->query()->fetchAll();
            $shopArr = array();
            foreach($alldata as $Key=>$Val){
                $shopArr[$Val['cat_name']][] = $Val; 
            }
//            prd($shopArr);
            return $shopArr;
        }

    }